Over recent years, usage of monitoring cameras becomes popular. However, in a case where a monitoring camera is actually used, when taking a video against light, there occurs a problem that a part of an area becomes dark and difficult to see and the video which is taken becomes blurred.
As a technique of correcting an image in a backlit state in a taken image, there is a technique (gradation correction, backlight correction, High Dynamic Range imaging, HDR) disclosed in PTL 1, for example.
The technique described in PTL 1 will be described. According to this technique, using a processing flow illustrated in FIG. 1, a backlit portion in an image is corrected.
First, the image processing system described in PTL 1 selects a local area that is an image area including one or more pixels from an input original image (step S801).
Next, the image processing system calculates a gradation correction amount of the selected local area (step S802). The image processing system calculates, in order to calculate the gradation correction amount of the local area, a luminance (peripheral area luminance) of an area (peripheral area) including the local area in which a center of the local area is set as an origin. As this peripheral area luminance, a median or average value of a luminance histogram of the peripheral area or a weighted average luminance value that is a weighted average of luminances of the peripheral area can be used. Then, the image processing system calculates a gradation correction amount of the local area on the basis of the peripheral area luminance.
When the gradation correction amount of the local area is calculated, the image processing system corrects a related gradation of the local area on the basis of the obtained local gradation correction amount (step S803). This local gradation correction is sequentially executed for one or more local areas.
The image processing system determines whether the gradation correction of a local area has been executed for all the local areas as correction targets (step S804). When an unprocessed local area remains (step S804—NO), the image processing system acquires a correction amount for the area and executes gradation correction therefor.
When processing is finished for all the local areas (step S804—YES), the image processing system terminates gradation correction processing.